home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / WindowMaker / WPrefs.app / WPrefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-02  |  3.2 KB  |  136 lines

  1. /* WPrefs.h- general definitions
  2.  * 
  3.  *  WPrefs - Window Maker Preferences Program
  4.  * 
  5.  *  Copyright (c) 1998, 1999 Alfredo K. Kojima
  6.  * 
  7.  *  This program is free software; you can redistribute it and/or modify
  8.  *  it under the terms of the GNU General Public License as published by
  9.  *  the Free Software Foundation; either version 2 of the License, or
  10.  *  (at your option) any later version.
  11.  *
  12.  *  This program is distributed in the hope that it will be useful,
  13.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  *  GNU General Public License for more details.
  16.  *
  17.  *  You should have received a copy of the GNU General Public License
  18.  *  along with this program; if not, write to the Free Software
  19.  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 
  20.  *  USA.
  21.  */
  22.  
  23. #ifndef WPREFS_H_
  24. #define WPREFS_H_
  25.  
  26. #include <stdlib.h>
  27. #include <stdio.h>
  28. #include <string.h>
  29. #include <signal.h>
  30.  
  31. #include <X11/Xlib.h>
  32.  
  33. #include <proplist.h>
  34.  
  35. #include <wraster.h>
  36.  
  37. #include <WINGs.h>
  38. #include <WUtil.h>
  39.  
  40. /* For EXTENDED_WINDOWSHORTCUT */
  41. #include "../src/wconfig.h"
  42.  
  43. /****/
  44.  
  45. #define WVERSION    "0.42"
  46. #define WMVERSION    "0.62.x"
  47.  
  48.  
  49. extern char *NOptionValueChanged;
  50.  
  51. typedef struct _Panel Panel;
  52.  
  53. typedef struct {
  54.     unsigned flags;               /* reserved for WPrefs.c Don't access it */
  55.     
  56.     void (*createWidgets)(Panel*);     /* called when showing for first time */
  57.     void (*updateDomain)(Panel*);      /* save the changes to the dictionary */
  58.     Bool (*requiresRestart)(Panel*);   /* return True if some static option was changed */
  59.     void (*undoChanges)(Panel*);       /* reset values to those in the dictionary */
  60.     void (*prepareForClose)(Panel*);   /* called when exiting WPrefs */
  61. } CallbackRec;
  62.  
  63.  
  64. /* all Panels must start with the following layout */
  65. typedef struct PanelRec {
  66.     WMFrame *frame;
  67.  
  68.     char *sectionName;               /* section name to display in titlebar */
  69.  
  70.     char *description;
  71.  
  72.     CallbackRec callbacks;
  73. } PanelRec;
  74.  
  75.  
  76.  
  77. void AddSection(Panel *panel, char *iconFile);
  78.  
  79. char *LocateImage(char *name);
  80.  
  81. WMWindow *GetWindow(Panel *panel);
  82.  
  83. /* manipulate the dictionary for the WindowMaker domain */
  84.  
  85. proplist_t GetObjectForKey(char *defaultName);
  86.  
  87. void SetObjectForKey(proplist_t object, char *defaultName);
  88.  
  89. void RemoveObjectForKey(char *defaultName);
  90.  
  91. char *GetStringForKey(char *defaultName);
  92.  
  93. int GetIntegerForKey(char *defaultName);
  94.  
  95. Bool GetBoolForKey(char *defaultName);
  96.  
  97. int GetSpeedForKey(char *defaultName);
  98.  
  99. void SetIntegerForKey(int value, char *defaultName);
  100.  
  101. void SetStringForKey(char *value, char *defaultName);
  102.  
  103. void SetBoolForKey(Bool value, char *defaultName);
  104.  
  105. void SetSpeedForKey(int speed, char *defaultName);
  106.  
  107.  
  108.  
  109. void AddDeadChildHandler(pid_t pid, void (*handler)(void*), void *data);
  110.  
  111.  
  112. #define FRAME_TOP    105
  113. #define FRAME_LEFT    -2
  114. #define FRAME_WIDTH    524
  115. #define FRAME_HEIGHT    235
  116.  
  117.  
  118.  
  119. /*
  120.  * Needed for HAVE_LIBINTL_H
  121.  */
  122. #include "../src/config.h"
  123.  
  124. #if HAVE_LIBINTL_H && I18N
  125. # include <libintl.h>
  126. # define _(text) gettext(text)
  127. #else
  128. # define _(text) (text)
  129. #endif
  130.  
  131. #endif
  132.  
  133.  
  134.  
  135.  
  136.